import { request } from '..'

// 获得顶部轮播图
export const getBannerApi = () => {
  return request.get({
    url: '/banner'
  })
}

// 获取推荐歌单
export const getPersonalizedApi = (limit: number) => {
  return request.get({
    url: '/personalized',
    params: {
      limit
    }
  })
}

// 获得新碟上架列表
export const getTopAlbumApi = () => {
  return request.get({
    url: '/album/newest'
  })
}

// 根据排行榜id获得相应的排行榜
export const getRankListApi = (id: number) => {
  return request.get({
    url: '/playlist/detail',
    params: {
      id
    }
  })
}

// 获得歌手列表
export const getArtistsApi = (
  cat: number,
  limit = 5,
  offset = 0
) => {
  return request.get({
    url: '/artist/list',
    params: {
      cat,
      limit,
      offset
    }
  })
}

// 最热主播榜
export const getDJToplistApi = (limit = 5) => {
  return request.get({
    url: '/dj/toplist',
    params: {
      limit
    }
  })
}

